1. Technical Field
One or more embodiments of the present disclosure relate to enhancing digital images. More specifically, one or more embodiments disclosed herein relate to systems and methods for enhancing a foreground of an image by making a background of the image uniform.
2. Background and Relevant Art
Computing devices (e.g., computers, tablets, smart phones) provide numerous ways to store and view digital content items. For example, many computing devices enable users to capture and store digital photographs (or simply “digital photos”) of documents, whiteboards, chalkboards, or other digital photos that includes foreground content (e.g., text, lines, handwriting) on a background. In capturing, scanning, transferring, and storing digital photos, various flaws or imperfections may be introduced and diminish the quality of the digital photos.
For example, digital photos of documents, whiteboards, or chalkboards often include various imperfections that diminish the quality of the digital photos. In particular, conditions in which digital photos of documents, whiteboards, or chalkboards are captured often contribute to various flaws that are introduced. In particular, perspective and/or lighting issues often cause digital photos of documents, whiteboards, or other images having a background to have non-white or off-color backgrounds when captured by a camera. Additionally, digital photos often include other non-uniformities in the background such as glare, shadows, vignetting, variations in illumination, or other flaws introduced as a result of non-ideal photo capturing conditions.
In order to compensate for various flaws that are introduced as a result of imperfect conditions and/or various properties of digital photos, conventional systems often process digital photos to generate a cleaned up or otherwise enhanced version of the digital photos. For example, conventional systems often analyze an image to identify content and/or remove various flaws. Conventional systems, however, experience difficulty when analyzing and enhancing digital photos that include handwritten content and/or digital photos including content on various backgrounds (e.g., documents, whiteboards, chalkboards).
Additionally, as a result of various flaws introduced when capturing and/or modifying (e.g., converting) a digital photo, conventional systems often fail to accurately identify and remove various flaws from within a digital photo. For example, as a result of off-color backgrounds, shadows, glare, and other non-uniformities, conventional systems often fail to distinguish between foreground content and a background of digital photos. As such, conventional systems often fail to meaningfully enhance digital photos that include handwritten content and/or other digital photos that include documents, whiteboards, chalkboards, or other digital images having particular backgrounds.
In particular, conventional systems often fail to identify or maintain relevant information when enhancing or otherwise processing a digital photo. For example, when content and/or backgrounds of a digital photo includes content having different shades of color or gray on a gray or off-color background, conventional systems often fail to preserve lighter shades of color or gray and thus exclude relevant information when providing a cleaned up version of the digital photo. As such, relevant information is often lost when processing and enhancing digital photos.
Accordingly, there are a number of considerations to be made in enhancing digital images.